import React, { useRef } from 'react';
import classNames from 'classnames';
import styles from './Mask.less';
import { Spin } from "antd"
import { LoadingOutlined } from '@ant-design/icons';

const antIcon = <LoadingOutlined style={{ fontSize: 48 }} spin />
interface Iprop {
    visible: boolean,
    zIndex: number
}

const Mask: React.FC<Iprop> = ({ visible, zIndex }) => {
    if (zIndex == null) zIndex = 1000
    return (
        visible ? <div style={{
            zIndex: zIndex
        }} className={classNames(styles.cmask)}><Spin size="large"/></div> : <></>
    )
}

export default Mask
